<?php
   define("APP",TRUE);
   require('modules/loader.php');
   
   $sql = "SELECT g.*,c.cat_name FROM gallery AS g JOIN category as c ON g.category=c.cid WHERE status=0";
   $list = $db->query($sql)->result_array();
   $data = array();
   $data['list'] = $list;
   $v->load('header');
   $v->load('index', $data);
?>